package limeirafol.gui.venda;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import lbframework.bean.consultaCampo.LBConsultaCampo;
import lbframework.bean.internalFrame.LBInternalFrame;
import lbframework.bean.mdiFrame.LBMdiFrame;
import lbframework.bean.table.LBColumnTable;
import lbframework.classe.LBException;
import lbframework.classe.Util;
import limeirafol.Global;
import limeirafol.bean.BeanVenda;
import limeirafol.gui.Cadastro.ClienteConsultaGUI;
import limeirafol.gui.MenuGUI;
import limeirafol.remote.cadastro.TipoProduto;
import limeirafol.remote.venda.InvoiceVO;
import limeirafol.remote.venda.PedidoItemVO;
import limeirafol.remote.venda.PedidoVO;
import limeirafol.remote.venda.SituacaoPedido;
import limeirafol.remote.venda.TipoFrete;
import org.openide.awt.DropDownButtonFactory;

public class PedidoCadastroGUI extends LBInternalFrame {

    public PedidoVO oPedido = new PedidoVO();
    private BeanVenda beanVenda = new BeanVenda();
    private JButton btnImprimir;
    private double valorTotal = 0;

    public PedidoCadastroGUI(LBMdiFrame i_mdiFrame) throws Exception {
        super(i_mdiFrame);

        initComponents();
        centralizarForm();

        txtDataHoraAbertura.setText(Util.getDataHoraAtual());

        cnsCliente.setTabela("cliente");
        cnsCliente.setCampoDescricao("nome");
        cnsCliente.addRetorno("utilizainvoice", LBConsultaCampo.BOOLEAN);
        cnsCliente.addRetorno("telefone", LBConsultaCampo.STRING);

        cboSituacao.setTabela("situacaopedido");
        cboSituacao.carregar();
        cboSituacao.setId(SituacaoPedido.EM_DIGITACAO.getId());

        cboFrete.setTabela("tipofrete");
        cboFrete.carregar();
        cboFrete.setId(TipoFrete.DESTINATARIO.getId());

        txtValorFrete.setEnabled(false);
        txtValorFrete.setObrigatorio(false);

        configurarBotaoImprimir();

        habilitaTela();

    }

    private void alterarProduto() throws Exception {
        if (tblItens.getLinhaSelecionada() == -1) {
            throw new LBException(Util.MSG_NENHUM_ITEM_SELECIONADO);
        }
        PedidoCadastroItemGUI form = new PedidoCadastroItemGUI(mdiFrame, this);
        form.carregarProduto(tblItens.getLinhaSelecionada());
        form.setVisible(true);
    }

    public void exibirProduto() throws Exception {
        double custoTotal = 0;
        double custoTotalBanho = 0;
        double pesoTotal = 0;

        LBColumnTable[] colunas = new LBColumnTable[]{
            new LBColumnTable("Produto", 70, true, SwingConstants.LEFT, false, null),
            new LBColumnTable("Descrição", 240, true, SwingConstants.LEFT, false, null),
            new LBColumnTable("Quantidade", 75, true, SwingConstants.RIGHT, false, null),
            new LBColumnTable("Custo Unitário", 80, true, SwingConstants.RIGHT, false, null),
            new LBColumnTable("Preço Venda", 80, true, SwingConstants.RIGHT, false, null),
            new LBColumnTable("Preço Banho", 80, true, SwingConstants.RIGHT, false, null),
            new LBColumnTable("Peso Unitáro", 80, true, SwingConstants.RIGHT, false, null),
            new LBColumnTable("Peso Total", 65, true, SwingConstants.RIGHT, false, null),
            new LBColumnTable("Valor Total Banho", 100, true, SwingConstants.RIGHT, false, null),
            new LBColumnTable("Valor Total", 80, true, SwingConstants.RIGHT, false, null)
        };
        Object[][] dados = new Object[oPedido.vItem.size()][colunas.length];

        int i = 0;

        for (PedidoItemVO oItem : oPedido.vItem) {
            dados[i][0] = Util.formatNumber(oItem.idProduto, 6);
            dados[i][1] = oItem.produto;
            dados[i][2] = oItem.quantidade;
            dados[i][3] = Util.formatDecimal2(oItem.precoCusto);
            dados[i][4] = Util.formatDecimal2(oItem.precoVenda);
            dados[i][5] = Util.formatDecimal2(oItem.precoBanho);
            dados[i][6] = Util.formatDecimal1(oItem.pesoUnitario) + " g";
            dados[i][7] = Util.formatDecimal1(oItem.pesoTotal) + " g";
            dados[i][8] = Util.formatDecimal2(oItem.precoBanho * oItem.quantidade);
            dados[i][9] = Util.formatDecimal2(oItem.subTotal);

            i++;

            custoTotal += oItem.precoCusto * oItem.quantidade;
            custoTotalBanho += oItem.precoBanho * oItem.quantidade;
            pesoTotal += oItem.pesoTotal;
            valorTotal += oItem.subTotal;

        }

        tblItens.setModel(dados, colunas);
        txtCustoTotal.setDouble(custoTotal);
        txtTotalBanho.setDouble(custoTotalBanho);
        txtPesoTotal.setDouble(pesoTotal);
        txtValorTotal.setDouble(valorTotal + txtValorFrete.getDouble());

    }

    private void configurarBotaoImprimir() throws Exception {
        btnImprimir = DropDownButtonFactory.createDropDownButton(new ImageIcon(new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB)), popImpressao);
        btnImprimir.setFocusable(false);
        btnImprimir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/imprimir.png")));

        btnImprimir.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    setWaitCursor();
                    imprimirPedido();

                } catch (Exception ex) {
                    Util.exibirMensagemErro(ex, getTitle());

                } finally {
                    setDefaultCursor();
                }
            }
        });

        lBToolBarPadrao1.add(btnImprimir);
    }

    private void removerProduto() throws Exception {
        if (tblItens.getLinhaSelecionada() == -1) {
            throw new LBException(Util.MSG_NENHUM_ITEM_SELECIONADO);
        }

        Util.exibirMensagemConfirmar(Util.MSG_CONFIRMA_EXCLUSAO, getTitle());

        oPedido.vItem.remove(tblItens.getLinhaSelecionada());

        exibirProduto();

        tblItens.requestFocus();
    }

    private void adicionarProduto() throws Exception {
        PedidoCadastroItemGUI form = new PedidoCadastroItemGUI(mdiFrame, this);

        form.incluir();
        form.setVisible(true);
    }

    @Override
    public void incluir() throws Exception {
        verificarAlteracaoTela();

        txtNumeroPedido.setText("");
        cnsCliente.clear();
        txtDataHoraAbertura.setText(Util.getDataHoraAtual());
        cboSituacao.setId(SituacaoPedido.EM_DIGITACAO.getId());
        txtNumeroOs.setText("");
        txtProforma.setText("");
        txtInVoice.setText("");
        txtDataHoraFinalizacao.setText("");
        cboFrete.setId(TipoFrete.DESTINATARIO.getId());
        txtValorFrete.setText("");
        txtCodigoRastreamento.setText("");
        txtCustoTotal.setText("");
        txtTotalBanho.setText("");
        txtPesoTotal.setText("");
        txtValorTotal.setText("");
        tblItens.clear();
        txtValorOuro.setDouble(Global.getParametro(5).getDouble());

        cnsCliente.requestFocus();

        oPedido = new PedidoVO();

        habilitaTela();

        getEstadoTelaInicial();
    }

    @Override
    public void salvar() throws Exception {
        Util.validarCampoTela(this.getCampoObrigatorio());

        oPedido.codigoRastreamento = txtCodigoRastreamento.getText();
        oPedido.custoTotal = txtCustoTotal.getDouble();
        oPedido.dataHoraAbertura = Util.formatDataHoraBanco(txtDataHoraAbertura.getText());
        oPedido.dataHoraFinalizacao = txtDataHoraFinalizacao.getText();
        oPedido.idCliente = cnsCliente.getId();
        oPedido.idOS = txtNumeroOs.getLong();
        oPedido.idSituacao = cboSituacao.getId();
        oPedido.idTipoFrete = cboFrete.getId();
        oPedido.invoice = txtInVoice.getInt();
        oPedido.pesoTotal = txtPesoTotal.getDouble();
        oPedido.proforma = txtProforma.getInt();
        oPedido.totalBanho = txtTotalBanho.getDouble();
        oPedido.valorFrete = txtValorFrete.getDouble();
        oPedido.valorTotal = txtValorTotal.getDouble();
        oPedido.valorOuro = txtValorOuro.getDouble();

        beanVenda.salvarPedido(oPedido);

        Util.exibirMensagem(Util.MSG_SALVO_SUCESSO, getTitle());

        txtNumeroPedido.setText(Util.formatNumber(oPedido.numeroPedido, 6));

        getEstadoTelaInicial();

        habilitaTela();

    }

    @Override
    public void finalizar() throws Exception {
        Util.validarCampoTela(this.getCampoObrigatorio());

        Util.exibirMensagemConfirmar("Confirma a finalização do pedido " + Util.formatNumber(txtNumeroPedido.getInt(), 6) + " ?", getTitle());

        if (!beanVenda.verificaOs(txtNumeroOs.getInt())) {
            Util.exibirMensagemConfirmar("A ordem de servico nº " + Util.formatNumber(txtNumeroOs.getInt(), 6) + " não está finalizada, deseja finalizar?", getTitle());

            beanVenda.finalizarOs(txtNumeroOs.getInt());
        }

        txtDataHoraFinalizacao.setText(Util.getDataHoraAtual());

        validaCampo();

        beanVenda.finalizarPedido(oPedido);

        cboSituacao.setId(SituacaoPedido.FINALIZADO.getId());

        habilitaTela();

        getEstadoTelaInicial();

    }

    @Override
    public void estornar() throws Exception {
        Util.exibirMensagemConfirmar("Confirma estorno", getTitle());

        beanVenda.estornarPedido(txtNumeroPedido.getInt());

        cboSituacao.setId(SituacaoPedido.PRODUCAO.getId());

        txtDataHoraFinalizacao.setText("");

        habilitaTela();

        getEstadoTelaInicial();

    }

    @Override
    public void cancelar() throws Exception {
        Util.exibirMensagemConfirmar("Confirma cancelamento", getTitle());

        if (!txtNumeroPedido.getText().isEmpty()) {
            Util.exibirMensagemConfirmar("Existe uma ordem de serviço para esse pedido, deseja cancelar a Ordem de Servico?", getTitle());

            beanVenda.cancelarOs(txtNumeroOs.getInt());
        }

        beanVenda.cancelarPedido(txtNumeroPedido.getInt());

        cboSituacao.setId(SituacaoPedido.CANCELADO.getId());

        habilitaTela();

        getEstadoTelaInicial();
    }

    private void validaCampo() throws Exception {
        oPedido.codigoRastreamento = txtCodigoRastreamento.getText();
        oPedido.custoTotal = txtCustoTotal.getDouble();
        oPedido.dataHoraAbertura = Util.formatDataHoraBanco(txtDataHoraAbertura.getText());
        oPedido.dataHoraFinalizacao = txtDataHoraFinalizacao.getText();
        oPedido.idCliente = cnsCliente.getId();
        oPedido.idOS = txtNumeroOs.getLong();
        oPedido.idSituacao = cboSituacao.getId();
        oPedido.idTipoFrete = cboFrete.getId();
        oPedido.invoice = txtInVoice.getInt();
        oPedido.pesoTotal = txtPesoTotal.getDouble();
        oPedido.proforma = txtProforma.getInt();
        oPedido.totalBanho = txtTotalBanho.getDouble();
        oPedido.valorFrete = txtValorFrete.getDouble();
        oPedido.valorTotal = txtValorTotal.getDouble();
        oPedido.valorOuro = txtValorOuro.getDouble();
    }

    private void habilitaTela() throws Exception {
        if (cboSituacao.getId() == SituacaoPedido.EM_DIGITACAO.getId() && txtNumeroPedido.getText().isEmpty()) {
            cnsCliente.setEnabled(true);
            txtNumeroOs.setEnabled(false);
            btnConsultarOs.setEnabled(false);
            txtProforma.setEnabled(false);
            txtInVoice.setEnabled(false);
            txtCodigoRastreamento.setEnabled(false);
            lBToolBarPadrao1.setEnabledSalvar(true);
            lBToolBarPadrao1.setEnabledEstornar(false);
            lBToolBarPadrao1.setEnabledFinalizar(false);
            lBToolBarPadrao1.setEnabledCancelar(false);
            btnImprimirInvoice.setEnabled(false);
            btnImprimirPedido.setEnabled(false);
            btnGerar.setEnabled(false);
            tblItens.setEnabled(true);
            btnAdicionar.setEnabled(true);
            btnRemover.setEnabled(true);
            btnLimpar.setEnabled(true);
            cboFrete.setEnabled(true);
            btnSalvar.setEnabled(true);

        } else if (cboSituacao.getId() == SituacaoPedido.EM_DIGITACAO.getId() && !txtNumeroPedido.getText().isEmpty()) {
            cnsCliente.setEnabled(true);
            txtNumeroOs.setEnabled(false);
            btnConsultarOs.setEnabled(false);
            txtProforma.setEnabled(false);
            txtInVoice.setEnabled(false);
            txtCodigoRastreamento.setEnabled(false);
            lBToolBarPadrao1.setEnabledSalvar(true);
            lBToolBarPadrao1.setEnabledEstornar(false);
            lBToolBarPadrao1.setEnabledFinalizar(false);
            lBToolBarPadrao1.setEnabledCancelar(false);
            btnImprimirInvoice.setEnabled(false);
            btnImprimirPedido.setEnabled(true);
            btnGerar.setEnabled(true);
            tblItens.setEnabled(true);
            btnAdicionar.setEnabled(true);
            btnRemover.setEnabled(true);
            btnLimpar.setEnabled(true);
            cboFrete.setEnabled(true);
            btnSalvar.setEnabled(true);

        } else if (cboSituacao.getId() == SituacaoPedido.PRODUCAO.getId()) {
            cnsCliente.setEnabled(false);
            txtNumeroOs.setEnabled(false);
            btnConsultarOs.setEnabled(true);
            txtProforma.setEnabled(true);
            txtInVoice.setEnabled(true);
            txtCodigoRastreamento.setEnabled(true);
            lBToolBarPadrao1.setEnabledSalvar(true);
            lBToolBarPadrao1.setEnabledEstornar(false);
            lBToolBarPadrao1.setEnabledFinalizar(true);
            lBToolBarPadrao1.setEnabledCancelar(true);
            btnImprimirInvoice.setEnabled(false);
            btnImprimirPedido.setEnabled(true);
            btnGerar.setEnabled(false);
            tblItens.setEnabled(false);
            btnAdicionar.setEnabled(false);
            btnRemover.setEnabled(false);
            btnLimpar.setEnabled(false);
            cboFrete.setEnabled(true);
            btnSalvar.setEnabled(true);

            verificaCampos();

        } else if (cboSituacao.getId() == SituacaoPedido.FINALIZADO.getId()) {
            cnsCliente.setEnabled(false);
            txtNumeroOs.setEnabled(false);
            btnConsultarOs.setEnabled(true);
            txtProforma.setEnabled(false);
            txtInVoice.setEnabled(false);
            txtValorFrete.setEnabled(false);
            txtCodigoRastreamento.setEnabled(false);
            lBToolBarPadrao1.setEnabledSalvar(false);
            lBToolBarPadrao1.setEnabledEstornar(true);
            lBToolBarPadrao1.setEnabledFinalizar(false);
            lBToolBarPadrao1.setEnabledCancelar(false);
            btnImprimirPedido.setEnabled(true);
            btnGerar.setEnabled(false);
            tblItens.setEnabled(false);
            btnAdicionar.setEnabled(false);
            btnRemover.setEnabled(false);
            btnLimpar.setEnabled(false);
            cboFrete.setEnabled(false);
            btnSalvar.setEnabled(false);

            if (cnsCliente.getBoolean("utilizainvoice")) {
                btnImprimirInvoice.setEnabled(true);
            } else {
                btnImprimirInvoice.setEnabled(false);
            }

            if (txtNumeroOs.getText().isEmpty()) {
                btnConsultarOs.setEnabled(false);
            } else {
                btnConsultarOs.setEnabled(true);
            }

        } else if (cboSituacao.getId() == SituacaoPedido.CANCELADO.getId()) {
            cnsCliente.setEnabled(false);
            txtNumeroOs.setEnabled(false);
            btnConsultarOs.setEnabled(false);
            txtProforma.setEnabled(false);
            txtInVoice.setEnabled(false);
            txtValorFrete.setEnabled(false);
            txtCodigoRastreamento.setEnabled(false);
            lBToolBarPadrao1.setEnabledSalvar(false);
            lBToolBarPadrao1.setEnabledEstornar(false);
            lBToolBarPadrao1.setEnabledFinalizar(false);
            lBToolBarPadrao1.setEnabledCancelar(false);
            btnImprimirInvoice.setEnabled(false);
            btnImprimirPedido.setEnabled(false);
            btnGerar.setEnabled(false);
            tblItens.setEnabled(false);
            btnAdicionar.setEnabled(false);
            btnRemover.setEnabled(false);
            btnLimpar.setEnabled(false);
            cboFrete.setEnabled(false);
            btnSalvar.setEnabled(false);
        }
    }

    public void carregarPedido(long i_numeroPedido) throws Exception {
        oPedido = beanVenda.carregarPedido(i_numeroPedido);

        txtNumeroPedido.setText(Util.formatNumber(i_numeroPedido, 6));
        cnsCliente.setId(oPedido.idCliente);
        cnsCliente.consultar();
        txtDataHoraAbertura.setText(oPedido.dataHoraAbertura);
        cboSituacao.setId(oPedido.idSituacao);
        txtNumeroOs.setText(oPedido.idOS == 0 ? "" : Util.formatNumber(oPedido.idOS, 6));
        txtProforma.setText(oPedido.proforma == 0 ? "" : Util.formatNumber(oPedido.proforma, 6));
        txtInVoice.setText(oPedido.invoice == 0 ? "" : Util.formatNumber(oPedido.invoice, 6));
        txtDataHoraFinalizacao.setText(oPedido.dataHoraFinalizacao);
        cboFrete.setId(oPedido.idTipoFrete);
        txtValorFrete.setDouble(oPedido.valorFrete);
        txtCodigoRastreamento.setText(oPedido.codigoRastreamento);
        txtValorOuro.setDouble(oPedido.valorOuro);

        habilitaTela();

        exibirProduto();

        getEstadoTelaInicial();
    }

    private void verificaCampos() throws Exception {
        if (cnsCliente.getBoolean("utilizainvoice")) {
            txtInVoice.setObrigatorio(true);
            txtProforma.setObrigatorio(true);
            txtCodigoRastreamento.setObrigatorio(true);

        } else {
            txtInVoice.setObrigatorio(false);
            txtProforma.setObrigatorio(false);
            txtCodigoRastreamento.setObrigatorio(false);
            txtInVoice.setEnabled(false);
            txtProforma.setEnabled(false);
        }
    }

    private void gerarOrdemServico() throws Exception {
        try {
            Util.validarCampoTela(this.getCampoObrigatorio());

            if (oPedido.vItem.isEmpty()) {
                throw new LBException("O pedido não pode ser gerado sem nenhum item.");
            }

            Util.exibirMensagemConfirmar("Confirma a geração do pedido?", getTitle());

            beanVenda.gerarOrdemServico(oPedido);

            txtNumeroOs.setText(Util.formatNumber(oPedido.idOS, 6));
            cboSituacao.setId(oPedido.idSituacao);

            beanVenda.salvarPedido(oPedido);

            habilitaTela();

            getEstadoTelaInicial();

        } catch (Exception e) {
            throw e;
        }
    }

    private void imprimirPedido() throws Exception {
        Map parametro = new HashMap();
        parametro.put("CLIENTE", cnsCliente.getDescricao());
        parametro.put("TELEFONE", cnsCliente.getString("telefone"));
        parametro.put("NUMERO_PEDIDO", txtNumeroPedido.getInt());
        parametro.put("NUMERO_OS", txtNumeroOs.getInt());

        Global.imprimir("pedido.jasper", oPedido.vItem, parametro);
    }

    private void imprimirInVoice() throws Exception {
        ArrayList<InvoiceVO> vItemImpressao = new ArrayList();

        boolean achou = false;

        for (PedidoItemVO oItem : oPedido.vItem) {
            InvoiceVO oInvoice = new InvoiceVO();

            for (InvoiceVO oItemProcura : vItemImpressao) {
                achou = false;

                if (oItem.idTipoProduto == oItemProcura.idTipoProduto) {
                    if (oItem.idTipoProduto == TipoProduto.BRINCO.getId()) {
                        oItemProcura.quantidade += oItem.quantidade;
                        oItemProcura.valorTotalItem += oItem.subTotal;
                        oItemProcura.valorItem = (oItemProcura.valorTotalItem / oItemProcura.quantidade);

                        achou = true;

                    } else if (oItem.idTipoProduto == TipoProduto.PULSEIRA.getId()) {
                        oItemProcura.quantidade += oItem.quantidade;
                        oItemProcura.valorItem += oItem.precoVenda;
                        oItemProcura.valorTotalItem += oItem.subTotal;

                        achou = true;

                    } else if (oItem.idTipoProduto == TipoProduto.GARGANTILHA.getId()) {
                        oItemProcura.quantidade += oItem.quantidade;
                        oItemProcura.valorItem += oItem.precoVenda;
                        oItemProcura.valorTotalItem += oItem.subTotal;

                        achou = true;

                    } else if (oItem.idTipoProduto == TipoProduto.ANEL.getId()) {
                        oItemProcura.quantidade += oItem.quantidade;
                        oItemProcura.valorItem += oItem.precoVenda;
                        oItemProcura.valorTotalItem += oItem.subTotal;

                        achou = true;
                    }
                }
            }

            if (!achou) {
                if (oItem.idTipoProduto == TipoProduto.BRINCO.getId()) {
                    oInvoice.descricao = "BRINCOS";
                    oInvoice.codigo = 1;
                    oInvoice.idTipoProduto = oItem.idTipoProduto;
                    oInvoice.quantidade = oItem.quantidade;
                    oInvoice.valorItem = oItem.precoVenda;
                    oInvoice.valorTotalItem = oItem.subTotal;

                } else if (oItem.idTipoProduto == TipoProduto.PULSEIRA.getId()) {
                    oInvoice.descricao = "PULSEIRAS";
                    oInvoice.codigo = 2;
                    oInvoice.idTipoProduto = oItem.idTipoProduto;
                    oInvoice.quantidade = oItem.quantidade;
                    oInvoice.valorItem = oItem.precoVenda;
                    oInvoice.valorTotalItem = oItem.subTotal;

                } else if (oItem.idTipoProduto == TipoProduto.GARGANTILHA.getId()) {
                    oInvoice.descricao = "GARGANTILHAS";
                    oInvoice.codigo = 3;
                    oInvoice.idTipoProduto = oItem.idTipoProduto;
                    oInvoice.quantidade = oItem.quantidade;
                    oInvoice.valorItem = oItem.precoVenda;
                    oInvoice.valorTotalItem = oItem.subTotal;

                } else if (oItem.idTipoProduto == TipoProduto.ANEL.getId()) {
                    oInvoice.descricao = "ANEIS";
                    oInvoice.codigo = 4;
                    oInvoice.idTipoProduto = oItem.idTipoProduto;
                    oInvoice.quantidade = oItem.quantidade;
                    oInvoice.valorItem = oItem.precoVenda;
                    oInvoice.valorTotalItem = oItem.subTotal;

                }

                vItemImpressao.add(oInvoice);
            }
        }

        Map parametro = new HashMap();
        parametro.put("DATA_INVOICE", Util.formatData(Util.getDataAtual(), "dd/MM/yyyy", "MM/dd/yyyy"));
        parametro.put("NUMERO_INVOICE", txtInVoice.getInt());

        Global.imprimir("invoice.jasper", vItemImpressao, parametro);
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        popImpressao = new javax.swing.JPopupMenu();
        btnImprimirPedido = new javax.swing.JMenuItem();
        btnImprimirInvoice = new javax.swing.JMenuItem();
        lBPanel1 = new lbframework.bean.panel.LBPanel();
        lBLabel1 = new lbframework.bean.label.LBLabel();
        txtNumeroPedido = new lbframework.bean.textField.LBTextField();
        lBLabel2 = new lbframework.bean.label.LBLabel();
        cnsCliente = new lbframework.bean.consultaCampo.LBConsultaCampo();
        lBLabel3 = new lbframework.bean.label.LBLabel();
        cboSituacao = new lbframework.bean.comboBox.LBComboBox();
        lBLabel4 = new lbframework.bean.label.LBLabel();
        txtDataHoraAbertura = new lbframework.bean.textField.LBTextField();
        lBLabel8 = new lbframework.bean.label.LBLabel();
        txtNumeroOs = new lbframework.bean.textField.LBTextField();
        btnConsultarOs = new lbframework.bean.button.LBButton();
        txtDataHoraFinalizacao = new lbframework.bean.textField.LBTextField();
        lBLabel9 = new lbframework.bean.label.LBLabel();
        lBLabel10 = new lbframework.bean.label.LBLabel();
        txtCodigoRastreamento = new lbframework.bean.textField.LBTextField();
        lBLabel11 = new lbframework.bean.label.LBLabel();
        txtProforma = new lbframework.bean.textField.LBTextField();
        lBLabel12 = new lbframework.bean.label.LBLabel();
        txtInVoice = new lbframework.bean.textField.LBTextField();
        lBLabel13 = new lbframework.bean.label.LBLabel();
        cboFrete = new lbframework.bean.comboBox.LBComboBox();
        txtValorFrete = new lbframework.bean.textField.LBTextField();
        lBLabel14 = new lbframework.bean.label.LBLabel();
        lBPanel2 = new lbframework.bean.panel.LBPanel();
        tblItens = new lbframework.bean.tableEx.LBTableEx();
        btnAdicionar = new lbframework.bean.button.LBButton();
        btnRemover = new lbframework.bean.button.LBButton();
        btnLimpar = new lbframework.bean.button.LBButton();
        lBPanel4 = new lbframework.bean.panel.LBPanel();
        btnSair = new lbframework.bean.button.LBButton();
        btnSalvar = new lbframework.bean.button.LBButton();
        lBToolBar1 = new lbframework.bean.toolBar.LBToolBar();
        lBToolBarPadrao1 = new lbframework.bean.toolBarPadrao.LBToolBarPadrao(this);
        btnGerar = new lbframework.bean.button.LBButton();
        lBPanel3 = new lbframework.bean.panel.LBPanel();
        lBLabel5 = new lbframework.bean.label.LBLabel();
        txtCustoTotal = new lbframework.bean.textField.LBTextField();
        lBLabel6 = new lbframework.bean.label.LBLabel();
        txtTotalBanho = new lbframework.bean.textField.LBTextField();
        lBLabel7 = new lbframework.bean.label.LBLabel();
        txtValorTotal = new lbframework.bean.textField.LBTextField();
        txtPesoTotal = new lbframework.bean.textField.LBTextField();
        lBLabel15 = new lbframework.bean.label.LBLabel();
        lBLabel16 = new lbframework.bean.label.LBLabel();
        txtValorOuro = new lbframework.bean.textField.LBTextField();

        btnImprimirPedido.setText("Pedido");
        btnImprimirPedido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirPedidoActionPerformed(evt);
            }
        });
        popImpressao.add(btnImprimirPedido);

        btnImprimirInvoice.setText("Invoice");
        btnImprimirInvoice.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirInvoiceActionPerformed(evt);
            }
        });
        popImpressao.add(btnImprimirInvoice);

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Cadastro Pedido");
        addInternalFrameListener(new javax.swing.event.InternalFrameListener() {
            public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
                formInternalFrameClosing(evt);
            }
            public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
            }
        });

        lBLabel1.setText("Numero Pedido");

        txtNumeroPedido.setColumns(6);
        txtNumeroPedido.setEnabled(false);
        txtNumeroPedido.setMascara("Numero");

        lBLabel2.setText("Cliente");

        cnsCliente.setObrigatorio(true);
        cnsCliente.addEventoConsultaCampoListener(new lbframework.bean.consultaCampo.LBEventoConsultaCampoListener() {
            public void abreTelaConsulta(lbframework.bean.consultaCampo.LBEventoConsultaCampo evt) {
                cnsClienteAbreTelaConsulta(evt);
            }
            public void aposConsulta(lbframework.bean.consultaCampo.LBEventoConsultaCampo evt) {
            }
        });

        lBLabel3.setText("Situacao");

        cboSituacao.setEnabled(false);

        lBLabel4.setText("Data/Hora Abertura");

        txtDataHoraAbertura.setEnabled(false);

        lBLabel8.setText("O.S. Nro.");

        txtNumeroOs.setEnabled(false);

        btnConsultarOs.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/consultar.png"))); // NOI18N
        btnConsultarOs.setEnabled(false);

        txtDataHoraFinalizacao.setEnabled(false);

        lBLabel9.setText("Data/Hora Finalização");

        lBLabel10.setText("Cod. Rastreamento");

        txtCodigoRastreamento.setEnabled(false);

        lBLabel11.setText("Proforma");

        txtProforma.setEnabled(false);

        lBLabel12.setText("IN-VOICE");

        txtInVoice.setEnabled(false);

        lBLabel13.setText("Frete");

        cboFrete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cboFreteActionPerformed(evt);
            }
        });

        txtValorFrete.setEnabled(false);
        txtValorFrete.setMascara("Decimal 2");
        txtValorFrete.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtValorFreteFocusLost(evt);
            }
        });

        lBLabel14.setText("Valor Frete");

        javax.swing.GroupLayout lBPanel1Layout = new javax.swing.GroupLayout(lBPanel1);
        lBPanel1.setLayout(lBPanel1Layout);
        lBPanel1Layout.setHorizontalGroup(
            lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lBPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(lBPanel1Layout.createSequentialGroup()
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNumeroPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cnsCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lBLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtDataHoraAbertura, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lBLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cboSituacao, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(lBPanel1Layout.createSequentialGroup()
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNumeroOs, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnConsultarOs, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtProforma, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtInVoice, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtDataHoraFinalizacao, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(lBPanel1Layout.createSequentialGroup()
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lBLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cboFrete, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtValorFrete, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lBLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtCodigoRastreamento, javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        lBPanel1Layout.setVerticalGroup(
            lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lBPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(lBPanel1Layout.createSequentialGroup()
                        .addComponent(lBLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtDataHoraAbertura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(lBPanel1Layout.createSequentialGroup()
                            .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lBLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(lBLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(cnsCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(cboSituacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(lBPanel1Layout.createSequentialGroup()
                            .addComponent(lBLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtNumeroPedido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(lBPanel1Layout.createSequentialGroup()
                        .addComponent(lBLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNumeroOs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnConsultarOs, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(lBPanel1Layout.createSequentialGroup()
                            .addGap(20, 20, 20)
                            .addComponent(txtDataHoraFinalizacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(lBPanel1Layout.createSequentialGroup()
                                .addComponent(lBLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtProforma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(lBPanel1Layout.createSequentialGroup()
                                .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lBLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lBLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtInVoice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(lBPanel1Layout.createSequentialGroup()
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lBLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cboFrete, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtValorFrete, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(lBPanel1Layout.createSequentialGroup()
                        .addComponent(lBLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCodigoRastreamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        lBPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Itens Pedido"));

        tblItens.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblItensMouseClicked(evt);
            }
        });
        tblItens.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                tblItensKeyPressed(evt);
            }
        });

        btnAdicionar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/adicionar.png"))); // NOI18N
        btnAdicionar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAdicionarActionPerformed(evt);
            }
        });

        btnRemover.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/remover.png"))); // NOI18N

        btnLimpar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/limpar.png"))); // NOI18N

        javax.swing.GroupLayout lBPanel2Layout = new javax.swing.GroupLayout(lBPanel2);
        lBPanel2.setLayout(lBPanel2Layout);
        lBPanel2Layout.setHorizontalGroup(
            lBPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, lBPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnAdicionar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRemover, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnLimpar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(tblItens, javax.swing.GroupLayout.DEFAULT_SIZE, 714, Short.MAX_VALUE)
        );
        lBPanel2Layout.setVerticalGroup(
            lBPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lBPanel2Layout.createSequentialGroup()
                .addComponent(tblItens, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lBPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnRemover, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAdicionar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnLimpar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        btnSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/sair.png"))); // NOI18N
        btnSair.setText("Sair");
        btnSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairActionPerformed(evt);
            }
        });

        btnSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/salvar.png"))); // NOI18N
        btnSalvar.setText("Salvar");
        btnSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout lBPanel4Layout = new javax.swing.GroupLayout(lBPanel4);
        lBPanel4.setLayout(lBPanel4Layout);
        lBPanel4Layout.setHorizontalGroup(
            lBPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, lBPanel4Layout.createSequentialGroup()
                .addContainerGap(554, Short.MAX_VALUE)
                .addComponent(btnSalvar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSair, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        lBPanel4Layout.setVerticalGroup(
            lBPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lBPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(btnSair, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(btnSalvar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        lBToolBar1.setRollover(true);

        lBToolBarPadrao1.setRollover(true);
        lBToolBarPadrao1.setVisibleCancelar(true);
        lBToolBarPadrao1.setVisibleEstornar(true);
        lBToolBarPadrao1.setVisibleFinalizar(true);
        lBToolBarPadrao1.setVisibleIncluir(true);
        lBToolBarPadrao1.setVisibleSalvar(true);
        lBToolBar1.add(lBToolBarPadrao1);

        btnGerar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/gerar.png"))); // NOI18N
        btnGerar.setFocusable(false);
        btnGerar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnGerar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnGerar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGerarActionPerformed(evt);
            }
        });
        lBToolBar1.add(btnGerar);

        lBLabel5.setText("Custo Total");

        txtCustoTotal.setEnabled(false);
        txtCustoTotal.setMascara("Decimal 2");

        lBLabel6.setText("Total Banho");

        txtTotalBanho.setEnabled(false);
        txtTotalBanho.setMascara("Decimal 2");

        lBLabel7.setText("Valor Total");

        txtValorTotal.setEnabled(false);
        txtValorTotal.setMascara("Decimal 2");

        txtPesoTotal.setEnabled(false);
        txtPesoTotal.setMascara("Decimal 2");

        lBLabel15.setText("Peso Total");

        lBLabel16.setText("Valor Ouro");

        txtValorOuro.setEnabled(false);
        txtValorOuro.setMascara("Decimal 2");

        javax.swing.GroupLayout lBPanel3Layout = new javax.swing.GroupLayout(lBPanel3);
        lBPanel3.setLayout(lBPanel3Layout);
        lBPanel3Layout.setHorizontalGroup(
            lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lBPanel3Layout.createSequentialGroup()
                .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtCustoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lBLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtTotalBanho, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lBLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lBLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtPesoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtValorTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lBLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtValorOuro, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lBLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(306, Short.MAX_VALUE))
        );
        lBPanel3Layout.setVerticalGroup(
            lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lBPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(lBPanel3Layout.createSequentialGroup()
                        .addComponent(lBLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtValorOuro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(lBPanel3Layout.createSequentialGroup()
                        .addComponent(lBLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCustoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(lBPanel3Layout.createSequentialGroup()
                        .addComponent(lBLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtTotalBanho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(lBPanel3Layout.createSequentialGroup()
                        .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lBLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lBLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(lBPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtValorTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtPesoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lBPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lBToolBar1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lBPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lBPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lBPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(lBToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lBPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lBPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lBPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lBPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairActionPerformed
        try {
            verificarAlteracaoTela();
            sair();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());
        }
    }//GEN-LAST:event_btnSairActionPerformed

    private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarActionPerformed
        try {
            salvar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());
        }
    }//GEN-LAST:event_btnSalvarActionPerformed

    private void cnsClienteAbreTelaConsulta(lbframework.bean.consultaCampo.LBEventoConsultaCampo evt) {//GEN-FIRST:event_cnsClienteAbreTelaConsulta
        try {
            MenuGUI menu = (MenuGUI) mdiFrame;

            if (menu.formClienteConsulta == null || menu.formClienteConsulta.isClosed()) {
                menu.formClienteConsulta = new ClienteConsultaGUI(mdiFrame);
            }

            menu.formClienteConsulta.setConsultaCampo(cnsCliente);
            menu.formClienteConsulta.setVisible(true);

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());
        }

    }//GEN-LAST:event_cnsClienteAbreTelaConsulta

    private void cboFreteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboFreteActionPerformed
        try {
            if (cboFrete.getId() == TipoFrete.DESTINATARIO.getId()) {
                txtValorFrete.setDouble(0);
                txtValorFrete.setEnabled(false);
                txtValorFrete.setObrigatorio(false);
                txtValorTotal.setDouble(valorTotal + txtValorFrete.getDouble());

            } else {
                txtValorFrete.setText("");
                txtValorFrete.setEnabled(true);
                txtValorFrete.setObrigatorio(true);
                txtValorTotal.setDouble(valorTotal + txtValorFrete.getDouble());
            }

        } catch (Exception e) {
            Util.exibirMensagemErro(e, getTitle());
        }
    }//GEN-LAST:event_cboFreteActionPerformed

    private void tblItensKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tblItensKeyPressed
        try {
            if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
                alterarProduto();

            } else if (evt.getKeyCode() == KeyEvent.VK_DELETE) {
                removerProduto();
            }

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());
        }
    }//GEN-LAST:event_tblItensKeyPressed

    private void tblItensMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblItensMouseClicked
        try {
            if (evt.getClickCount() == 2) {
                alterarProduto();
            }

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());
        }
    }//GEN-LAST:event_tblItensMouseClicked

    private void btnAdicionarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdicionarActionPerformed
        try {
            adicionarProduto();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());
        }
    }//GEN-LAST:event_btnAdicionarActionPerformed

    private void txtValorFreteFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtValorFreteFocusLost
        try {
            txtValorTotal.setDouble(valorTotal + txtValorFrete.getDouble());

        } catch (Exception e) {
            Util.exibirMensagemErro(e, getTitle());
        }
    }//GEN-LAST:event_txtValorFreteFocusLost

    private void formInternalFrameClosing(javax.swing.event.InternalFrameEvent evt) {//GEN-FIRST:event_formInternalFrameClosing
        try {
            verificarAlteracaoTela();
            sair();

        } catch (Exception e) {
            Util.exibirMensagemErro(e, getTitle());
        }
    }//GEN-LAST:event_formInternalFrameClosing

    private void btnImprimirPedidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirPedidoActionPerformed
        try {
            setWaitCursor();
            imprimirPedido();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());

        } finally {
            setDefaultCursor();
        }
}//GEN-LAST:event_btnImprimirPedidoActionPerformed

    private void btnImprimirInvoiceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirInvoiceActionPerformed
        try {
            setWaitCursor();
            imprimirInVoice();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());

        } finally {
            setDefaultCursor();
        }
}//GEN-LAST:event_btnImprimirInvoiceActionPerformed

    private void btnGerarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGerarActionPerformed
        try {
            gerarOrdemServico();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, getTitle());
        }
    }//GEN-LAST:event_btnGerarActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private lbframework.bean.button.LBButton btnAdicionar;
    private lbframework.bean.button.LBButton btnConsultarOs;
    private lbframework.bean.button.LBButton btnGerar;
    private javax.swing.JMenuItem btnImprimirInvoice;
    private javax.swing.JMenuItem btnImprimirPedido;
    private lbframework.bean.button.LBButton btnLimpar;
    private lbframework.bean.button.LBButton btnRemover;
    private lbframework.bean.button.LBButton btnSair;
    private lbframework.bean.button.LBButton btnSalvar;
    private lbframework.bean.comboBox.LBComboBox cboFrete;
    private lbframework.bean.comboBox.LBComboBox cboSituacao;
    private lbframework.bean.consultaCampo.LBConsultaCampo cnsCliente;
    private lbframework.bean.label.LBLabel lBLabel1;
    private lbframework.bean.label.LBLabel lBLabel10;
    private lbframework.bean.label.LBLabel lBLabel11;
    private lbframework.bean.label.LBLabel lBLabel12;
    private lbframework.bean.label.LBLabel lBLabel13;
    private lbframework.bean.label.LBLabel lBLabel14;
    private lbframework.bean.label.LBLabel lBLabel15;
    private lbframework.bean.label.LBLabel lBLabel16;
    private lbframework.bean.label.LBLabel lBLabel2;
    private lbframework.bean.label.LBLabel lBLabel3;
    private lbframework.bean.label.LBLabel lBLabel4;
    private lbframework.bean.label.LBLabel lBLabel5;
    private lbframework.bean.label.LBLabel lBLabel6;
    private lbframework.bean.label.LBLabel lBLabel7;
    private lbframework.bean.label.LBLabel lBLabel8;
    private lbframework.bean.label.LBLabel lBLabel9;
    private lbframework.bean.panel.LBPanel lBPanel1;
    private lbframework.bean.panel.LBPanel lBPanel2;
    private lbframework.bean.panel.LBPanel lBPanel3;
    private lbframework.bean.panel.LBPanel lBPanel4;
    private lbframework.bean.toolBar.LBToolBar lBToolBar1;
    private lbframework.bean.toolBarPadrao.LBToolBarPadrao lBToolBarPadrao1;
    private javax.swing.JPopupMenu popImpressao;
    private lbframework.bean.tableEx.LBTableEx tblItens;
    private lbframework.bean.textField.LBTextField txtCodigoRastreamento;
    private lbframework.bean.textField.LBTextField txtCustoTotal;
    private lbframework.bean.textField.LBTextField txtDataHoraAbertura;
    private lbframework.bean.textField.LBTextField txtDataHoraFinalizacao;
    private lbframework.bean.textField.LBTextField txtInVoice;
    private lbframework.bean.textField.LBTextField txtNumeroOs;
    private lbframework.bean.textField.LBTextField txtNumeroPedido;
    private lbframework.bean.textField.LBTextField txtPesoTotal;
    private lbframework.bean.textField.LBTextField txtProforma;
    private lbframework.bean.textField.LBTextField txtTotalBanho;
    private lbframework.bean.textField.LBTextField txtValorFrete;
    private lbframework.bean.textField.LBTextField txtValorOuro;
    private lbframework.bean.textField.LBTextField txtValorTotal;
    // End of variables declaration//GEN-END:variables
}
